package com.conncui.subscript.fragment;

import com.conncui.common.tool.LifeCycle;
import com.conncui.common.tool.ToolLog;
import com.conncui.subscript.R;
import com.conncui.subscript.persenter.ShowPresenterV2;

import android.content.Context;
import android.os.Bundle;
import androidx.annotation.Nullable;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

public class V2SubscriptFragment extends Fragment {
    String TAG;
    Context mContext;
    ShowPresenterV2 mShowPresenterV2;

    public V2SubscriptFragment() {
        this.TAG = getClass().getSimpleName();
    }

    public void onAttach(Context context) {
        super.onAttach(context);
        this.mContext = context;
    }

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Nullable
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return LayoutInflater.from(this.mContext).inflate(R.layout.layout_overlay, null);
    }

    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
    }

    public void onViewCreated(View view, Bundle savedInstanceState) {
        if (view != null) {
            this.mShowPresenterV2 = new ShowPresenterV2(getActivity(), view);
            this.mShowPresenterV2.createView();
            return;
        }
        ToolLog.d(this.TAG, LifeCycle.getCurrentMethodName(), "view is null");
    }

    public void onStart() {
        super.onStart();
    }

    public void onResume() {
        super.onResume();
        if (this.mShowPresenterV2 != null) {
            this.mShowPresenterV2.onResume();
        }
    }

    public void onPause() {
        super.onPause();
    }

    public void onStop() {
        super.onStop();
    }

    public void onDestroy() {
        super.onDestroy();
    }

    public void onDestroyView() {
        super.onDestroyView();
    }

    public void onDetach() {
        super.onDetach();
    }
}
